<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>
<%
    String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
    <meta http-equiv="description" content="This is my page"/>

    <link href="${pageContext.request.contextPath}/static/css/front.css" rel="stylesheet" type="text/css"
          media="screen"/>
    <link href="${pageContext.request.contextPath}/static/css/daoke.css.css" rel="stylesheet" type="text/css"
          media="screen"/>
    <link href="${pageContext.request.contextPath}/static/css/iconfont.css" rel="stylesheet" type="text/css"
          media="screen"/>
    <script type="text/javascript">
        function register(expertId) {
            <c:choose>
            <c:when test="${not empty currentUser}">
            var url = "${pageContext.request.contextPath}/front/register/addRegister.jsp?expertId=" + expertId;
            window.location.href = url;
            </c:when>
            <c:otherwise>
            alert("请先登录");
            </c:otherwise>
            </c:choose>
        }
    </script>
</head>

<body style="background: -webkit-linear-gradient(#A5DBFE,#FFFFFF)">
<jsp:include flush="true" page="/front/inc/top.jsp"></jsp:include>
<div class="w1440 bg-f" style="margin: 0 auto;min-height: 700px;">
    <div id="page-bgtop">
        <div id="page-bgbtm">
            <div id="content">
                <div class="post">
                    <div class="entry">
                        <form action="" name="formwww" method="post">
                            <TABLE class=main border=0 cellSpacing=0 cellPadding=0 height=115
                                   style="margin-top: 10px;margin-left: 10px;">
                                <TR>
                                    <td valign="top">
                                        <fieldset style="width:160px; height: 200px;">
                                            <legend class="fieldtitle font18">专家照片</legend>
                                            <table class="bill" width="97%">
                                                <tr>
                                                    <td><IMG border=0 align=absMiddle
                                                             src="../../${expert.file }" width=130
                                                             height=160></td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </td>
                                    <td></td>
                                    <td valign="top">
                                        <fieldset style="margin-left:5px;height: 100%;">
                                            <legend class="fieldtitle font18">个人信息</legend>
                                            <table class="bill font16" width="420" cellpadding="5" cellspacing="5">
                                                <tr>
                                                    <td>姓名：${expert.name}</td>
                                                </tr>
                                                <tr>
                                                    <td>性别：${expert.sex}</td>
                                                </tr>
                                                <tr>
                                                    <td>年龄：${expert.age}</td>
                                                </tr>
                                                <tr>
                                                    <td>擅长：${expert.skilled}</td>
                                                </tr>
                                                <tr>
                                                    <td>类型：${expert.type}</td>
                                                </tr>
                                                <tr>
                                                    <td>医院：${expert.hospital.name}</td>
                                                </tr>
                                                <tr>
                                                    <td>科室：${expert.department.name}</td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <input type="button" value="挂号" style="width: 80px;"
                                                               onclick="register(${expert.id})" class="btn"/>&nbsp;
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </td>
                                </TR>
                            </TABLE>
                        </form>
                    </div>
                </div>
                <div style="clear: both;">&nbsp;</div>
            </div>
            <jsp:include flush="true" page="/front/inc/right.jsp"></jsp:include>
            <div style="clear: both;">&nbsp;</div>
        </div>
    </div>
</div>


<div style="margin: 0 auto;height: 140px;background: #545454;color:#bbbbbb;margin-top: 20px;text-align: center;" class="w1440 font14 text-c">
    <div class="ht30 l-ht30" style="font-size: 18px;line-height: 80px;">Copyright (c) 2019 Sitename.com. All rights reserved.</div>
    <div class="ht30 l-ht30" style="font-size: 18px;line-height: 80px;"><a
            href="${pageContext.request.contextPath}/login.jsp" style="color: #ffffff">管理员或医生登陆</a></div>

</div>
</body>
</html>
